﻿Imports System.Data.SqlClient
Imports System.Data
Partial Class nextcontact
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Dim command As SqlCommand
        Dim queryString As String

        Dim conn As New SqlConnection("Data Source=sql.bluetonemedia.com;Initial Catalog=BlueToneMediaDB;Persist Security Info=True;User ID=BTMWiz;Password=esquel4ma@gic")

        queryString = "Update Companys SET NextContact = @next WHERE ID = @companyid"


        command = New SqlCommand(queryString, conn)

        command.Parameters.Add(New SqlParameter("@companyid", SqlDbType.Int, 11))
        command.Parameters("@companyid").Value = Request.QueryString("companyid")
        command.Parameters.Add(New SqlParameter("@next", SqlDbType.DateTime))
        command.Parameters("@next").Value = Request.QueryString("next")


        command.Connection.Open()
        command.ExecuteNonQuery()
        command.Connection.Close()

        Response.Redirect("display.htm")
    End Sub
End Class
